<script type="text/javascript">
    $(function(){
        $('.dropdown-toggle').dropdown();
    });
</script>
<?php
/* @var $this BackendController */
/* @var $model Article */

$this->breadcrumbs=array(
    Yii::t('ArticleModule.base','Articles')=>array('index'),
    Yii::t('ArticleModule.base',$model->title),
);

$this->menu=array(
	array('label'=>'<span class="glyphicon glyphicon-list-alt"></span>&nbsp'.Yii::t('ArticleModule.base','List Article'), 'url'=>array('index')),
	array('label'=>'<span class="glyphicon glyphicon-plus-sign"></span>&nbsp'.Yii::t('ArticleModule.base','Create Article'), 'url'=>array('create')),
	array('label'=>'<span class="glyphicon glyphicon-cog"></span>&nbsp'.Yii::t('ArticleModule.base','Manage Article'), 'url'=>array('admin')),

    array('label'=>'<span class="glyphicon glyphicon-wrench "></span>&nbsp'.Yii::t('ArticleModule.base','Operations').'&nbsp<span class=caret></span>','url'=>array('#'),'itemOptions'=>array('class'=>'dropdown','aria-labelledby'=>'dLabel'),'items'=>array(
        array('label'=>'<span class="glyphicon glyphicon-refresh"></span>&nbsp'.Yii::t('ArticleModule.base','Update Article'), 'url'=>array('update', 'id'=>$model->id),'linkOptions'=>array('role'=>'menuitem','tabindex'=>-1),'itemOptions'=>array('class'=>'dropdown','role'=>'presentation')),
        array('label'=>'<span class="glyphicon glyphicon-trash"></span>&nbsp'.Yii::t('ArticleModule.base','Delete Article'), 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->id),'confirm'=>Yii::t('ArticleModule.base','Are you sure you want to delete this item?'))),
    ),
        'submenuOptions'=>array('class'=>'dropdown-menu', 'role'=>"menu",'aria-labelledby'=>"drop1"),
        'linkOptions'=>array('class'=>'dropdown-toggle','id'=>'dLabel','data-toggle'=>'dropdown')
    ),


);
?>
<?php if(Yii::app()->user->hasFlash('success')):?>
    <div class="alert alert-success">
        <?php echo Yii::app()->user->getFlash('success');?>
    </div>
<?php endif;?>
<div class="panel panel-default">
    <div class="panel-heading">
        <span class="glyphicon glyphicon-list" style="padding-right:3px"></span><span class="h4"><?php echo Yii::t('ArticleModule.base','View Article')?></span>
    </div>
    <div class="panel-body" style="padding:0">
        <?php $this->widget('zii.widgets.CDetailView', array(
            'data'=>$model,
            'attributes'=>array(
                'id',
                array(
                    'label'=>Yii::t('ArticleModule.base','Image'),
                    'type'=>'raw',
                    'value'=>CHtml::image(Yii::app()->baseUrl.'/images/article/'.$model->id.'/'.$model->image,Yii::t('ArticleModule.base','Image'),array('style'=>'height:100px')),
                ),
                'title',
                array(
                    'label'=>'description',
                    'type'=>'raw',
                    'value'=>CHtml::decode($model->description),
                ),
                array(
                    'label'=>'content',
                    'type'=>'raw',
                    'value'=>CHtml::decode($model->content),
                ),

                array(
                    'label'=>Yii::t('ArticleModule.base','Create Time'),
                    'type'=>'raw',
                    'value'=>CLocale::getInstance(Yii::app()->getLocale()->id)->dateFormatter->formatDateTime(strtotime($model->create_time),'long','short'),
                ),
                array(
                    'label'=>Yii::t('ArticleModule.base','Update Time'),
                    'type'=>'raw',
                    'value'=>CLocale::getInstance(Yii::app()->getLocale()->id)->dateFormatter->formatDateTime(strtotime($model->update_time),'long','short'),
                ),
                array(
                    'label'=>Yii::t('ArticleModule.base','Status'),
                    'type'=>'raw',
                    'value'=>CHtml::encode($model->getArticleStatus()),
                ),
                array(
                    'label'=>Yii::t('ArticleModule.base','Category'),
                    'type'=>'raw',
                    'value'=>$model->categories->name,
                ),
                'tags',
                array(
                    'label'=>Yii::t('ArticleModule.base','Create User'),
                    'type'=>'raw',
                    'value'=>'<i>'.Yii::t('ArticleModule.base','Name').'</i>'.' : '.$model->getCreateUserIdOptions()->name.' | '.'<i>'.Yii::t('ArticleModule.base','Login').'</i>'.' : '.$model->getCreateUserIdOptions()->login.' | '.
                    '<i>'.Yii::t('ArticleModule.base','Role').'</i>'.' : '.$model->getCreateUserIdOptions()->role,
                ),
                'update_user_id',
            ),
        )); ?>
    </div>
</div>